﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using SLControlLibrary.Resources.Controls.Calendar.Common;

namespace SLControlLibrary.Resources.Controls.Calendar.ClassicCalendar
{
    public class ucCalendarItem : ucCalendarImage
    {
        #region Variables
        private int _Value = DateTime.Today.Month;
        #endregion

        #region Properties
        public int Value {
            get { return _Value; }
            set
            {
                _Value = value;
                base.Desc = value.ToString();
                base.ShortDesc = Enum.Parse(typeof(Enumerations.MonthsInYearShortDesc), value.ToString(), false).ToString();
                base.LongDesc = Enum.Parse(typeof(Enumerations.MonthsInYearLongDesc), value.ToString(), false).ToString();
                base.DescToUse = Enumerations.BaseDescToUse.Short;
            }
        }
        #endregion

        #region Event Variables
        public event Events.CalendarItemClickedHandler ValueEvent;
        #endregion 

        #region Constructor
        public ucCalendarItem()
        {
            DefaultStyleKey = typeof(ucCalendarItem);
        }
        #endregion

        #region Events
        #region OnMouseLeftButtonUp
        protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
        {
            ValueEvent(this, null);

            base.OnMouseLeftButtonUp(e);
        }
        #endregion
        #endregion
    }
}
